package com.easyfun.healthmagicbox;

import org.acra.ReportField.*;
import org.acra.*;
import org.acra.annotation.*;

import android.app.Application;

@ReportsCrashes(formKey = "", // will not be used
	formUri = "http://www.kangbox.cn/cakephp/crashreport.php",
	httpMethod = org.acra.sender.HttpSender.Method.PUT,
	reportType = org.acra.sender.HttpSender.Type.JSON,
	//formUriBasicAuthLogin = "yourlogin", // optional
	//formUriBasicAuthPassword = "y0uRpa$$w0rd" // optional
	additionalSharedPreferences={"UserInfo"},
//{"UserInfo.APP_USERNAME","UserInfo.APP_PERSONID",
//		"UserInfo.STRING_AQ","UserInfo.STRING_SW",
//		"UserInfo.RedoTaskID","UserInfo.serverURL"},
	customReportContent = { 
		ReportField.APP_VERSION_CODE, 
		ReportField.APP_VERSION_NAME, 
		ReportField.ANDROID_VERSION,
		ReportField.PHONE_MODEL, 
		ReportField.CUSTOM_DATA, 
		ReportField.STACK_TRACE, 
		ReportField.SHARED_PREFERENCES,
		ReportField.AVAILABLE_MEM_SIZE,
		ReportField.TOTAL_MEM_SIZE
		//ReportField.LOGCAT 
		}
	)
public class HealthBoxApplication extends Application {
    private static HealthBoxApplication instance;

    public static HealthBoxApplication getInstance() {
        return instance;
    }

    @Override
    public void onCreate() {
        
        super.onCreate();
        instance = this;
        ACRA.init(this);
    }
}
